//
//  ZMRefreshView.swift
//  GoldFader
//
//  Created by 智蚂优服 on 2019/11/28.
//  Copyright © 2019 聚邦宜华. All rights reserved.
//

import UIKit
import MJRefresh

class ZMRefreshView: UIView {
    
    /// 下拉刷新
    /// - Parameter complete: <#complete description#>
    open class func addNormalRefreshHeaderWithBlock(complete: (() ->Void)?) -> MJRefreshNormalHeader {
        let refreshHeader = MJRefreshNormalHeader {
            complete!()
        }
        refreshHeader.stateLabel?.isHidden = true
        refreshHeader.loadingView?.style = .gray;
        refreshHeader.lastUpdatedTimeLabel?.isHidden = true
        return refreshHeader
    }
    
    /// 上拉加载更多
    /// - Parameter complete: <#complete description#>
    open class func addBackNormalFooterWithBlock(complete: (() -> Void)?) -> MJRefreshAutoNormalFooter {
        let refreshFooter = MJRefreshAutoNormalFooter {
            complete!()
        }
        return refreshFooter
    }
}
